<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Module: ReverseChronic
  
    &mdash; Documentation by YARD 0.7.5
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '';
  if (relpath != '') relpath += '/';
</script>

  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="_index.html">Index (R)</a> &raquo; 
    
    
    <span class="title">ReverseChronic</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a id="class_list_link" href="#">Class List</a>
  
    <a id="method_list_link" href="#">Method List</a>
  
    <a id="file_list_link" href="#">File List</a>
  
</div>
      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Module: ReverseChronic
  
  
  
</h1>

<dl class="box">
  
  
    
  
    
  
  
  
    <dt class="r1 last">Defined in:</dt>
    <dd class="r1 last">lib/reverse_chronic.rb<span class="defines">,<br />
  lib/reverse_chronic/version.rb</span>
</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    
<p>Proposes to accomplish the reverse tasks of the existing rubygem `chronic`
<a href="http://rubygems.org/gems/chronic">rubygems.org/gems/chronic</a>
But we're not there yet</p>


  </div>
</div>
<div class="tags">
  

</div>
  <h2>Constant Summary</h2>
  
    <dl class="constants">
      
        <dt id="VERSION-constant" class="">VERSION =
          <div class="docstring">
  <div class="discussion">
    
<p>The current stable version of `reverse_chronic`</p>


  </div>
</div>
<div class="tags">
  

</div>
        </dt>
        <dd><pre class="code"><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0.0.1</span><span class='tstring_end'>&quot;</span></span></pre></dd>
      
    </dl>
  







  
    <h2>
      Class Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#humanize-class_method" title="humanize (class method)">+ (Object) <strong>humanize</strong>(time) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Converts a Date or Time object into a human-friendly string.</p>
</div></span>
  
</li>

      
    </ul>
  



  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="humanize-class_method">
  
    + (<tt>Object</tt>) <strong>humanize</strong>(time) 
  

  
</p><div class="docstring">
  <div class="discussion">
    
<p>Converts a Date or Time object into a human-friendly string</p>

<h2>Paramaters:</h2>
<table class="rdoc-list"><tr><td class="rdoc-term"><p>time</p></td>
<td>
<p>A Date or Time object</p>
</td></tr></table>

<h2>Returns:</h2>

<pre class="code ruby"><code>A string representing a human way of saying the date, such as `today`, `yesterday`, and `Sunday, Feb 5, 2012`</code></pre>

<h2>TODO:</h2>

<pre class="code ruby"><code><span class='const'>More</span> <span class='id identifier rubyid_human'>human</span> <span class='id identifier rubyid_friendly'>friendly</span> <span class='id identifier rubyid_calculations'>calculations</span></code></pre>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


19
20
21
22
23
24
25
26
27</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/reverse_chronic.rb', line 19</span>

<span class='kw'>def</span> <span class='id identifier rubyid_humanize'>humanize</span><span class='lparen'>(</span><span class='id identifier rubyid_time'>time</span><span class='rparen'>)</span>
  <span class='kw'>if</span> <span class='id identifier rubyid_time'>time</span><span class='period'>.</span><span class='id identifier rubyid_to_date'>to_date</span> <span class='op'>==</span> <span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_today'>today</span>
    <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>today</span><span class='tstring_end'>'</span></span>
  <span class='kw'>elsif</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_date'>to_date</span> <span class='op'>-</span> <span class='int'>1</span> <span class='op'>==</span> <span class='id identifier rubyid_time'>time</span><span class='period'>.</span><span class='id identifier rubyid_to_date'>to_date</span>
    <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>yesterday</span><span class='tstring_end'>'</span></span>
  <span class='kw'>else</span>
    <span class='id identifier rubyid_time'>time</span><span class='period'>.</span><span class='id identifier rubyid_strftime'>strftime</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%A, %b%e, %Y</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on Wed Feb  8 09:40:22 2012 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.7.5 (ruby-1.9.3).
</div>

  </body>
</html>